﻿@using WineStore.Extends;
@using PagedList.Mvc;
@using PagedList;
@model PagedList.IPagedList<WineStore.Models.Product>
@{
    Layout = null;
}

 <style type="text/css">
        input, textarea, select {
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 3px;
            width: 200px;
            color: #333;
            box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
            -moz-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
            -webkit-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
        }

        textarea {
            width: 400px;
            height: 100px;
            max-width: 400px;
            line-height: 18px;
            border-radius: 3px;
        }
         

            input:hover, textarea:hover, select:hover
            input:focus, textarea:focus, select:focus {
                border-color: 10px solid #C9C9C9;
                box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                -moz-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                -webkit-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                border-radius: 3px;
            }

        input .submit{
            height: 38px;
            background-color: #474E69;
            color: #FFF;
            border-radius: 3px;
            -moz-border-radius: 3px;
            -webkit-border-radius: 3px;
        }
    </style>

<table border="1px;" style="width: 100%">
    <tr>
        <th>Category Name
        </th>
        <th>Product Name (English)
        </th>
        <th>Product Name (German)
        </th>
        <th>
            @Html.ActionLink("Product Price (USD)", "ShowProduct", new { sortOrder = ViewBag.SortPriceParm, currentFilter = ViewBag.CurrentFilter }, new { @class = "showTip L1", style = "color:White; text-decoration:none" })
        </th>
        <th>Image
        </th>
        <th>Event
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(product => item.Category.CategoryName_EN)
            </td>
            <td>
                @Html.DisplayFor(product => item.ProductName_EN)
            </td>
            <td>
                @Html.DisplayFor(product => item.ProductName_GER)
            </td>
            <td>
                @Html.DisplayFor(product => item.ProductPrice)
            </td>
            <td>
                @Html.ImageFor(product => "../../Content/Images/Products/" + item.ProductImage, new { width = "200px", height = "200px", alt = "some alt text" })

            </td>
            <td>
                @Html.ActionLink("Edit", "EditProduct", new { id = item.ProductId })
                @Html.ActionLink("Delete", "DeleteProduct", new { id = item.ProductId })
            </td>
        </tr>
    }
    <tr>
        <td colspan="9" style="text-align: right;">
            @Html.ActionLink("Create Product", "CreateProduct")
        </td>
    </tr>
</table>
<!--Paging-->
@Html.PagedListPager(Model, page => Url.Action("ShowProduct", new { page = page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }), (PagedListRenderOptions)ViewBag.Pro)
